import request from '@/utils/request'
import { unionApiUrl } from '@/api/config'

/**
 * 延期归档申请列表
 */
export function getDelayApplyList(data) {
  return request({
    url: unionApiUrl + '/archiveExtendedApply/getPageArchiveExtendedApply',
    method: 'post',
    data
  })
}

/**
 * 延期归档申请新增
 */
export function addDelayApply(data) {
  return request({
    url: unionApiUrl + '/archiveExtendedApply/insertSelective',
    method: 'post',
    data
  })
}

/**
 * 延期归档申请详情
 */
 export function getDelayApplyDetail(params) {
    return request({
      url: unionApiUrl + '/archiveExtendedApply/getArchiveExtendedApplyById',
      method: 'get',
      params
    })
  }

/**
 * 延期归档申请编辑
 */
export function editDelayApply(data) {
  return request({
    url: unionApiUrl + '/archiveExtendedApply/updateByPrimaryKeySelective',
    method: 'post',
    data
  })
}

/**
 * 延期归档申请删除
 */
export function deleteDelayApply(params) {
    return request({
      url: unionApiUrl + '/archiveExtendedApply/deleteByPrimaryKey',
      method: 'post',
      params
    })
  }

/**
 * 检查是否还能提交延期归档申请
 */
export function accessIfDelayApply(data) {
    return request({
        url: unionApiUrl + '/archiveExtendedApply/applyCheck',
        method: 'post',
        data
    })
}

/**
 * 获取原计划归档时间
 */
export function getPlanTime(params) {
  return request({
    url: unionApiUrl + '/archiveExtendedApply/originalArchiveTime',
    method: 'post',
    params
  })
}